package jsproto.c2s.iclass.room;

import jsproto.c2s.cclass.BaseSendMsg;
import jsproto.c2s.cclass.room.RoomPosInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class SBase_VisitUpdate extends BaseSendMsg {

    // 房间ID
    private long roomID;
    /**
     * 0-进入房间，-1-退出房间
     */
    private int action;
    // 玩家位置
    private int pos;
    //观众位置
    private int visit;
    // 房间玩家信息
    private RoomPosInfo posInfo;
    // 房间观众信息
    private RoomPosInfo visitInfo;

    public static SBase_VisitUpdate make(long roomID, int action, int pos, int visit, RoomPosInfo posInfo, RoomPosInfo visitInfo) {
        SBase_VisitUpdate ret = new SBase_VisitUpdate();
        ret.setRoomID(roomID);
        ret.setAction(action);
        ret.setPos(pos);
        ret.setVisit(visit);
        ret.setPosInfo(posInfo);
        ret.setVisitInfo(visitInfo);
        return ret;
    }

}
